﻿using Ardalis.Specification;
using HuaweiCloud.Dotnet.Samples.ESports.Main.Entities;

namespace HuaweiCloud.Dotnet.Samples.ESports.Main.Specification
{
    public class CompletedEventsSpecification : Specification<CompletedEvents>
    {
        /// <summary>
        /// 查找用户是否完成指定活动
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <param name="eventsId">活动id</param>
        public CompletedEventsSpecification(Guid userId, Guid eventsId)
        {
            Query.Where(x => x.UserId == userId && x.EventsId == eventsId);
        }
    }
}
